package ch.six4rty.doodle.data
{
	/**
	 * User Data Object
	 * @author Tiago Dias [six4rty.ch, Switzerland]
	 */
	
	public class UserData
	{
		public var _id					:int;
		public var _userName			:String;
		public var _userID				:String;
		public var _options				:Array		= new Array();
		
		public var _optionsLen			:int;
		
		
		namespace doodleNS 				= "http://doodle.com/xsd1";
		
		/**
		 * 
		 * @param xml
		 * 
		 */		
		public function UserData( xml:XML )
		{
			use namespace doodleNS;
			
			_id							= xml.id;
			_userName					= xml.name;
			_userID						= xml.userId;
			
			for each ( var option:XML in xml.preferences.option )
			{
				_options.push( option.toString() );
			}
			
		}
	}
}